import { createApp } from 'vue'
import './style.less'
import App from './App.vue'
//注册路由
import router from './router'
//注册pinia
import {createPinia} from 'pinia'

const store=createPinia()
import { VaeStore } from './store'
//路由前置守卫
router.beforeEach((to,from,next)=>{
    //设置网页标题
    document.title=to.meta.title as string;
    //导航菜单选中
    VaeStore().setactiveKey(to.name as string)
    
    next();
})


createApp(App).use(router).use(store).mount('#app')
